home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / axes.h < prev    next >
C/C++ Source or Header  |  1994-10-10  |  1KB  |  32 lines

  1. #ifndef __AXES_H_
  2. #define __AXES_H_
  3.  
  4. #include "graphpp.h"
  5. #include <string.h>
  6.  
  7. struct Axes
  8.     {
  9.         int len_scr;               // Length on screen, pixels
  10.         int* ticks;                // Ticks offset from axe beginning, pixels
  11.         int* sub_ticks;            // Sub-ticks, -//-
  12.         char** labels;             // Ticks commentaries
  13.         int ticks_no;              // Total number of ticks
  14.         int sub_ticks_no;          // Total number of sub ticks
  15.  
  16.     Axes(int l, double start = 0, double end = 0,
  17.             int tick_no = 5, int* t = NULL,
  18.         int s_tick_no = 0, int* s = NULL,
  19.         char** lab = NULL);
  20.     ~Axes();
  21.     virtual loc get_label_pos(loc, int )
  22.             { return loc(0, 0); }
  23.     virtual void show_axes(loc, int) {}
  24.     void draw_axes(loc lt, int, int);
  25.     virtual void show_labels(loc) {}
  26.     int calc_labels(double start, double end, int t = 5, int s = 0);
  27.     };
  28. //-------------------------------------------------------------------------//
  29.  
  30.  
  31.  
  32. #endif __AXES_H_